<!doctype html>
<html class="default no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>crypto
	| burstjs - The Burstcoin Reference Library</title>
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="robots" content="index, follow">
	<link rel="stylesheet" href="../assets/css/main.css">
	<link rel="stylesheet" href="../assets/css/custom.css">
</head>
<body>
<a href="https://github.com/burst-apps-team/phoenix/tree/master/lib" class="github-corner" aria-label="View source on GitHub">
	<svg width="80" height="80" viewBox="0 0 250 250"
	style="fill:rgba(3, 155, 229, 0.90); color:#fff; position: absolute; top: 0; border: 0; left: 0; z-index: 2; transform: scale(-1, 1);"
	aria-hidden="true">
	<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
	<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
	fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
	<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
	fill="currentColor" class="octo-body"></path>
	</svg>
</a>
<header>
	<div class="tsd-page-toolbar">
		<div class="container">
			<div class="tsd-logo-wrapper">
				<a href="../index.html" class="title">
					<img id="tsd-burstjs-logo" alt="burstjs" src="../assets/images/burstjs.png">
				</a>
				<a href="https://www.npmjs.com/package/@burstjs/core">
					<img id="tsd-npm-badge" alt="npm"
					src="https://img.shields.io/npm/v/@burstjs/core.svg?style=for-the-badge">
				</a>
			</div>
			<div class="table-wrap">
				<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js"
				data-base="..">
				<div class="field">
					<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
					<input id="tsd-search-field" type="text"/>
				</div>
				<ul class="results">
					<li class="state loading">Preparing search index...</li>
					<li class="state failure">The search index is not available</li>
				</ul>
			</div>
			<div class="table-cell" id="tsd-widgets">
				<div id="tsd-filter">
					<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
					<div class="tsd-filter-group">
						<div class="tsd-select" id="tsd-filter-visibility">
							<span class="tsd-select-label">All</span>
							<ul class="tsd-select-list">
								<li data-value="public">Public</li>
								<li data-value="protected">Public/Protected</li>
								<li data-value="private" class="selected">All</li>
							</ul>
						</div>
						<input type="checkbox" id="tsd-filter-inherited" checked/>
						<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
						<input type="checkbox" id="tsd-filter-externals" checked/>
						<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
					</div>
				</div>
				<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
			</div>
		</div>
	</div>
	</div>
	<div class="tsd-page-title">
		<div class="container">
			<ul class="tsd-breadcrumb">
				<li>
					<a href="../globals.html">Globals</a>
				</li>
				<li>
					<a href="crypto.html">crypto</a>
				</li>
			</ul>
			<h1>External module crypto</h1>
		</div>
	</div>
</header>
<div class="container container-main">
	<div class="row">
		<div class="col-8 col-content">
			<section class="tsd-panel tsd-comment">
				<div class="tsd-comment tsd-typography">
				</div>
			</section>
			<section class="tsd-panel-group tsd-index-group">
				<h2>Index</h2>
				<section class="tsd-panel tsd-index-panel">
					<div class="tsd-index-content">
						<section class="tsd-index-section ">
							<h3>Classes</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-class tsd-parent-kind-external-module"><a href="../classes/crypto.converter.html" class="tsd-kind-icon">Converter</a></li>
								<li class="tsd-kind-class tsd-parent-kind-external-module"><a href="../classes/crypto.passphrasegenerator.html" class="tsd-kind-icon">Pass<wbr>Phrase<wbr>Generator</a></li>
							</ul>
						</section>
						<section class="tsd-index-section ">
							<h3>Interfaces</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-interface tsd-parent-kind-external-module"><a href="../interfaces/crypto.encrypteddata.html" class="tsd-kind-icon">Encrypted<wbr>Data</a></li>
								<li class="tsd-kind-interface tsd-parent-kind-external-module"><a href="../interfaces/crypto.encryptedmessage.html" class="tsd-kind-icon">Encrypted<wbr>Message</a></li>
								<li class="tsd-kind-interface tsd-parent-kind-external-module"><a href="../interfaces/crypto.keys.html" class="tsd-kind-icon">Keys</a></li>
							</ul>
						</section>
						<section class="tsd-index-section ">
							<h3>Functions</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="crypto.html#decryptaes" class="tsd-kind-icon">decryptAES</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="crypto.html#decryptdata" class="tsd-kind-icon">decrypt<wbr>Data</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="crypto.html#decryptmessage" class="tsd-kind-icon">decrypt<wbr>Message</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="crypto.html#encryptaes" class="tsd-kind-icon">encryptAES</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="crypto.html#encryptdata" class="tsd-kind-icon">encrypt<wbr>Data</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="crypto.html#encryptmessage" class="tsd-kind-icon">encrypt<wbr>Message</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="crypto.html#generatemasterkeys" class="tsd-kind-icon">generate<wbr>Master<wbr>Keys</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="crypto.html#generatesignature" class="tsd-kind-icon">generate<wbr>Signature</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="crypto.html#generatesignedtransactionbytes" class="tsd-kind-icon">generate<wbr>Signed<wbr>Transaction<wbr>Bytes</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="crypto.html#getaccountidfrompublickey" class="tsd-kind-icon">get<wbr>Account<wbr>IdFrom<wbr>Public<wbr>Key</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="crypto.html#hashsha256" class="tsd-kind-icon">hashSHA256</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="crypto.html#verifysignature" class="tsd-kind-icon">verify<wbr>Signature</a></li>
							</ul>
						</section>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Functions</h2>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="decryptaes" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagConst">Const</span> decryptAES</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">decryptAES<span class="tsd-signature-symbol">(</span>encryptedBase64<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/burst-apps-team/phoenix/blob/a7e7857/lib/packages/crypto/src/decryptAES.ts#L11">crypto/src/decryptAES.ts:11</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Decrypt an encrypted message</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>encryptedBase64: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<div class="lead">
											<p>encrypted data in base64 format</p>
										</div>
									</div>
								</li>
								<li>
									<h5>key: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<div class="lead">
											<p>The secret key</p>
										</div>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
							<p>The decrypted content</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="decryptdata" class="tsd-anchor"></a>
					<h3>decrypt<wbr>Data</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">decrypt<wbr>Data<span class="tsd-signature-symbol">(</span>encryptedData<span class="tsd-signature-symbol">: </span><a href="../interfaces/crypto.encrypteddata.html" class="tsd-signature-type">EncryptedData</a>, senderPublicKeyHex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, recipientPrivateKeyHex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/burst-apps-team/phoenix/blob/a7e7857/lib/packages/crypto/src/decryptData.ts#L54">crypto/src/decryptData.ts:54</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Decrypts an encrypted cipher text</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>encryptedData: <a href="../interfaces/crypto.encrypteddata.html" class="tsd-signature-type">EncryptedData</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>The encrypted data</p>
									</div>
								</li>
								<li>
									<h5>senderPublicKeyHex: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The senders public key in hex format</p>
									</div>
								</li>
								<li>
									<h5>recipientPrivateKeyHex: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The recipients private (agreement) key in hex format</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Uint8Array</span></h4>
							<p>The original plain text</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="decryptmessage" class="tsd-anchor"></a>
					<h3>decrypt<wbr>Message</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">decrypt<wbr>Message<span class="tsd-signature-symbol">(</span>encryptedMessage<span class="tsd-signature-symbol">: </span><a href="../interfaces/crypto.encryptedmessage.html" class="tsd-signature-type">EncryptedMessage</a>, senderPublicKeyHex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, recipientPrivateKeyHex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/burst-apps-team/phoenix/blob/a7e7857/lib/packages/crypto/src/decryptMessage.ts#L18">crypto/src/decryptMessage.ts:18</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Decrypts an encrypted Message</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>encryptedMessage: <a href="../interfaces/crypto.encryptedmessage.html" class="tsd-signature-type">EncryptedMessage</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>The encrypted message</p>
									</div>
								</li>
								<li>
									<h5>senderPublicKeyHex: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The senders public key in hex format</p>
									</div>
								</li>
								<li>
									<h5>recipientPrivateKeyHex: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The recipients private (agreement) key in hex format</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
							<p>The original message</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="encryptaes" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagConst">Const</span> encryptAES</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">encryptAES<span class="tsd-signature-symbol">(</span>text<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/burst-apps-team/phoenix/blob/a7e7857/lib/packages/crypto/src/encryptAES.ts#L8">crypto/src/encryptAES.ts:8</a></li>
								</ul>
							</aside>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>text: <span class="tsd-signature-type">string</span></h5>
								</li>
								<li>
									<h5>key: <span class="tsd-signature-type">string</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="encryptdata" class="tsd-anchor"></a>
					<h3>encrypt<wbr>Data</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">encrypt<wbr>Data<span class="tsd-signature-symbol">(</span>plaintext<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Uint8Array</span>, recipientPublicKeyHex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, senderPrivateKeyHex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/crypto.encrypteddata.html" class="tsd-signature-type">EncryptedData</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/burst-apps-team/phoenix/blob/a7e7857/lib/packages/crypto/src/encryptData.ts#L46">crypto/src/encryptData.ts:46</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Encrypts arbitrary data</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>plaintext: <span class="tsd-signature-type">Uint8Array</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>Data to be encrypted</p>
									</div>
								</li>
								<li>
									<h5>recipientPublicKeyHex: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The recipients public key in hexadecimal format</p>
									</div>
								</li>
								<li>
									<h5>senderPrivateKeyHex: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The senders private (agreement) key hexadecimal format</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="../interfaces/crypto.encrypteddata.html" class="tsd-signature-type">EncryptedData</a></h4>
							<p>The encrypted Data</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="encryptmessage" class="tsd-anchor"></a>
					<h3>encrypt<wbr>Message</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">encrypt<wbr>Message<span class="tsd-signature-symbol">(</span>plaintext<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, recipientPublicKeyHex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, senderPrivateKeyHex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/crypto.encryptedmessage.html" class="tsd-signature-type">EncryptedMessage</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/burst-apps-team/phoenix/blob/a7e7857/lib/packages/crypto/src/encryptMessage.ts#L18">crypto/src/encryptMessage.ts:18</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Encrypts a message (UTF-8 compatible)</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>plaintext: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>Message to be encrypted</p>
									</div>
								</li>
								<li>
									<h5>recipientPublicKeyHex: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The recipients public key hexadecimal format</p>
									</div>
								</li>
								<li>
									<h5>senderPrivateKeyHex: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The senders private (agreement) key hexadecimal format</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="../interfaces/crypto.encryptedmessage.html" class="tsd-signature-type">EncryptedMessage</a></h4>
							<p>The encrypted Message</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="generatemasterkeys" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagConst">Const</span> generate<wbr>Master<wbr>Keys</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">generate<wbr>Master<wbr>Keys<span class="tsd-signature-symbol">(</span>passPhrase<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/crypto.keys.html" class="tsd-signature-type">Keys</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/burst-apps-team/phoenix/blob/a7e7857/lib/packages/crypto/src/generateMasterKeys.ts#L13">crypto/src/generateMasterKeys.ts:13</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Generate the Master Public Key and Master Private Key for a new passphrase</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>passPhrase: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<div class="lead">
											<p>The passphrase</p>
										</div>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="../interfaces/crypto.keys.html" class="tsd-signature-type">Keys</a></h4>
							<p>EC-KCDSA sign key pair + agreement key</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="generatesignature" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagConst">Const</span> generate<wbr>Signature</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">generate<wbr>Signature<span class="tsd-signature-symbol">(</span>messageHex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, privateKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/burst-apps-team/phoenix/blob/a7e7857/lib/packages/crypto/src/generateSignature.ts#L20">crypto/src/generateSignature.ts:20</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Generate a signature for the transaction</p>
								</div>
								<p>Method:</p>
								<pre><code> s = sign(<span class="hljs-name">sha256</span>(<span class="hljs-name">sha256</span>(<span class="hljs-name">transactionHex</span>)_keygen(<span class="hljs-name">sha256</span>(<span class="hljs-name">sha256</span>(<span class="hljs-name">transactionHex</span>)_privateKey)).publicKey),
         sha256(<span class="hljs-name">sha256</span>(<span class="hljs-name">transactionHex</span>)_privateKey),
         privateKey)
 p = sha256(<span class="hljs-name">sha256</span>(<span class="hljs-name">transactionHex</span>)_keygen(<span class="hljs-name">sha256</span>(<span class="hljs-name">transactionHex_privateKey</span>)).publicKey)</code></pre>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>messageHex: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<div class="lead">
											<p>The data in hexadecimal representation</p>
										</div>
									</div>
								</li>
								<li>
									<h5>privateKey: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<div class="lead">
											<p>The private key for signing</p>
										</div>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="generatesignedtransactionbytes" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagConst">Const</span> generate<wbr>Signed<wbr>Transaction<wbr>Bytes</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">generate<wbr>Signed<wbr>Transaction<wbr>Bytes<span class="tsd-signature-symbol">(</span>unsignedTransactionHex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, signature<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/burst-apps-team/phoenix/blob/a7e7857/lib/packages/crypto/src/generateSignedTransactionBytes.ts#L9">crypto/src/generateSignedTransactionBytes.ts:9</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Generates a signed message digest</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>unsignedTransactionHex: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<div class="lead">
											<p>The unsigned message</p>
										</div>
									</div>
								</li>
								<li>
									<h5>signature: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<div class="lead">
											<p>The signature</p>
										</div>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
							<p>The signed message digest</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="getaccountidfrompublickey" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagConst">Const</span> get<wbr>Account<wbr>IdFrom<wbr>Public<wbr>Key</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">get<wbr>Account<wbr>IdFrom<wbr>Public<wbr>Key<span class="tsd-signature-symbol">(</span>publicKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/burst-apps-team/phoenix/blob/a7e7857/lib/packages/crypto/src/getAccountIdFromPublicKey.ts#L11">crypto/src/getAccountIdFromPublicKey.ts:11</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Convert hex string of the public key to the account id</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>publicKey: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<div class="lead">
											<p>The public key</p>
										</div>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
							<p>The numeric account Id</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="hashsha256" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagConst">Const</span> hashSHA256</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">hashSHA256<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/burst-apps-team/phoenix/blob/a7e7857/lib/packages/crypto/src/hashSHA256.ts#L8">crypto/src/hashSHA256.ts:8</a></li>
								</ul>
							</aside>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>input: <span class="tsd-signature-type">string</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="verifysignature" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagConst">Const</span> verify<wbr>Signature</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">verify<wbr>Signature<span class="tsd-signature-symbol">(</span>signature<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, messageHex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, publicKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/burst-apps-team/phoenix/blob/a7e7857/lib/packages/crypto/src/verifySignature.ts#L20">crypto/src/verifySignature.ts:20</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Verify a signature for given message</p>
								</div>
								<ul>
									<li>Method:<pre><code>* h1 = sha256(<span class="hljs-name">sha256</span>(<span class="hljs-name">transactionHex</span>)_keygen(<span class="hljs-name">sha256</span>(<span class="hljs-name">transactionHex_privateKey</span>)).publicKey)
==
sha256(<span class="hljs-name">sha256</span>(<span class="hljs-name">transactionHex</span>)_verify(<span class="hljs-name">v</span>, h1, publickey)) = h2</code></pre></li>
								</ul>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>signature: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<div class="lead">
											<p>The signature to be verified</p>
										</div>
									</div>
								</li>
								<li>
									<h5>messageHex: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<div class="lead">
											<p>The message data in hexadecimal representation</p>
										</div>
									</div>
								</li>
								<li>
									<h5>publicKey: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<div class="lead">
											<p>The public key</p>
										</div>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
						</li>
					</ul>
				</section>
			</section>
		</div>
		<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
			<nav class="tsd-navigation primary">
				<ul>
					<li class="globals  ">
						<a href="../globals.html"><em>Globals</em></a>
					</li>
					<li class=" tsd-kind-external-module">
						<a href="core.html">core</a>
					</li>
					<li class="current tsd-kind-external-module">
						<a href="crypto.html">crypto</a>
					</li>
					<li class=" tsd-kind-external-module">
						<a href="http.html">http</a>
					</li>
					<li class=" tsd-kind-external-module">
						<a href="util.html">util</a>
					</li>
				</ul>
			</nav>
			<nav class="tsd-navigation secondary menu-sticky">
				<ul class="before-current">
					<li class=" tsd-kind-class tsd-parent-kind-external-module">
						<a href="../classes/crypto.converter.html" class="tsd-kind-icon">Converter</a>
					</li>
					<li class=" tsd-kind-class tsd-parent-kind-external-module">
						<a href="../classes/crypto.passphrasegenerator.html" class="tsd-kind-icon">Pass<wbr>Phrase<wbr>Generator</a>
					</li>
					<li class=" tsd-kind-interface tsd-parent-kind-external-module">
						<a href="../interfaces/crypto.encrypteddata.html" class="tsd-kind-icon">Encrypted<wbr>Data</a>
					</li>
					<li class=" tsd-kind-interface tsd-parent-kind-external-module">
						<a href="../interfaces/crypto.encryptedmessage.html" class="tsd-kind-icon">Encrypted<wbr>Message</a>
					</li>
					<li class=" tsd-kind-interface tsd-parent-kind-external-module">
						<a href="../interfaces/crypto.keys.html" class="tsd-kind-icon">Keys</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="crypto.html#decryptaes" class="tsd-kind-icon">decryptAES</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="crypto.html#decryptdata" class="tsd-kind-icon">decrypt<wbr>Data</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="crypto.html#decryptmessage" class="tsd-kind-icon">decrypt<wbr>Message</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="crypto.html#encryptaes" class="tsd-kind-icon">encryptAES</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="crypto.html#encryptdata" class="tsd-kind-icon">encrypt<wbr>Data</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="crypto.html#encryptmessage" class="tsd-kind-icon">encrypt<wbr>Message</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="crypto.html#generatemasterkeys" class="tsd-kind-icon">generate<wbr>Master<wbr>Keys</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="crypto.html#generatesignature" class="tsd-kind-icon">generate<wbr>Signature</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="crypto.html#generatesignedtransactionbytes" class="tsd-kind-icon">generate<wbr>Signed<wbr>Transaction<wbr>Bytes</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="crypto.html#getaccountidfrompublickey" class="tsd-kind-icon">get<wbr>Account<wbr>IdFrom<wbr>Public<wbr>Key</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="crypto.html#hashsha256" class="tsd-kind-icon">hashSHA256</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="crypto.html#verifysignature" class="tsd-kind-icon">verify<wbr>Signature</a>
					</li>
				</ul>
			</nav>
		</div>
	</div>
</div>
<footer class="with-border-bottom">
	<div class="container">
		<h2>Legend</h2>
		<div class="tsd-legend-group">
			<ul class="tsd-legend">
				<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
				<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
				<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
				<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
				<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
				<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
				<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
				<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
				<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
				<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
				<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
				<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
				<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
				<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
				<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
				<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
				<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
				<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
				<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
				<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
				<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
			</ul>
		</div>
	</div>
</footer>
<div class="container tsd-generator">
	<p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
</body>
</html>